import request from '@/utils/request'

// 查询投标列表
export function listBid(query) {
  return request({
    url: '/system/bid/list',
    method: 'get',
    params: query
  })
}

// 查询投标详细
export function getBid(taskId) {
  return request({
    url: '/system/bid/' + taskId,
    method: 'get'
  })
}

export function getBidCount(employerId) {
  return request({
    url: '/system/bid/bidCount?employerId=' + employerId,
    method: 'get'
  })
}

// 新增投标
export function addBid(data) {
  return request({
    url: '/system/bid',
    method: 'post',
    data: data
  })
}
//投标
export function addTouBiao(data) {
  return request({
    url: '/system/bid/toubiao',
    method: 'post',
    data: data
  })
}

export function giveUpBid(data) {
  return request({
    url: '/system/bid/giveUpBid',
    method: 'post',
    data: data
  })
}

// 修改投标
export function updateBid(data) {
  return request({
    url: '/system/bid',
    method: 'put',
    data: data
  })
}

// 删除投标
export function delBid(taskId) {
  return request({
    url: '/system/bid/' + taskId,
    method: 'delete'
  })
}
